<?php
	session_start();
	include("load-settings.php");

	if(!isset($_SESSION['user']))
		die("Access denied");

	$user = $_SESSION['user'];

	$result = mysql_query("SELECT * FROM user WHERE id = $user");
	$row = mysql_fetch_array($result);
	$access = $row['type'];

	if($access != 2)
		die("Access denied");

	$id = mysql_real_escape_string($_POST['id']);
	
	mysql_query("DELETE FROM booster_chat WHERE id = $id");
?>